package com.lanou.elh.sysmanage.authority_management.service.impl;

import com.lanou.elh.sysmanage.authority_management.entity.Permission;
import com.lanou.elh.sysmanage.authority_management.entity.RolePerm;
import com.lanou.elh.sysmanage.authority_management.entity.User;
import com.lanou.elh.sysmanage.authority_management.mapper.UserMapper;
import com.lanou.elh.sysmanage.authority_management.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectUserByUserName(String username) {
        return userMapper.selectUserByUserName(username);
    }

    @Override
    public User findById(Integer id) {
        return userMapper.findById(id);
    }

    @Override
    public RolePerm finPerIdByRoleId(Integer roleId) {
        return userMapper.finPerIdByRoleId(roleId);
    }

    @Override
    public List<Permission> findPerbyPerId(Integer permissionId) {
        return userMapper.findPerbyPerId(permissionId);
    }
}
